<?if($this->tid==21391){?>
                <div class="boxBody border-radius-bottom" style="padding:10px 0;"> 
                    <?php 
                       if(count($this->event_list) > 0){
                           foreach($this->event_list as $eventObj){
                               $epicture = EVENT_STATIC_SERVER."/images/nophoto.gif";
                               if($this->tid==21391 && $eventObj->banner!=""){
                                    $epicture = EVENT_IMG_URL_PATH."/".$eventObj->banner;  
                               }
                               $href = "/event/detail/".$eventObj->eid;
                               if($this->action=='category' && $eventObj->short_cut != ""){
                                   $href = "/event/".$eventObj->short_cut;
                               }
                               else if($this->action=='category' && $eventObj->website != ""){
                                   $href = $eventObj->website;
                               }
                    ?>
                    <div class="item" id="div_event_<?php echo $eventObj->eid;?>">  
                        <a href="<?=$href?>" class="float-left"><img src="<?=$epicture?>" width="364" height="101" alt="image" /></a>
                        <div class="text-contet">
                            <h1><a href="<?php echo $href;?>"><?php echo check_plain($eventObj->event_name);?></a>
                            </h1>
                            <p><span>Từ <?=date("g:i", $eventObj->start_time)?>' <?=date("a", $eventObj->start_time)?> ngày <?=date("d/m/Y", $eventObj->start_time)?>  tới <?=date("g:i", $eventObj->end_time)?>' <?=date("a", $eventObj->end_time)?> ngày <?=date("d/m/Y", $eventObj->end_time)?></span></p>
                            <?if($eventObj->address!=""){?>
                            <p><span>Địa điểm <strong><?=$eventObj->address?></strong></span></p>
                            <?}else{?></br><?}?>
                            <?if($eventObj->city_name!=""){?>
                            <p><span>Tỉnh/TP : <?=$eventObj->city_name?></span></p>
                            <?}?>
                            <p><span><?switch($eventObj->access){case 0:echo 'Sự kiện mở cửa tự do, mọi người có thể tham gia';break;
                            case 1:echo 'Để tham gia sự kiện, cần có thư mời của admin hoặc cần nhận được sự đồng ý của admin';break;
                            case 2:echo 'Để tham gia sự kiện, cần có thư mời của admin';break;}?></span></p>
                        </div>
                    </div> 
                    <?php 
                           }// end for loop
                       } // end of if
                    ?>
                        

                <?php echo $this->pager;?>  
                </div>
<?}else{?>
    <!--    <div class="float-left" style="width:770px;">
            <div class="boxed category-user">         -->
                <div class="boxBody border-radius-bottom"> 
                    <?php 
                       if(count($this->event_list) > 0){
                           foreach($this->event_list as $eventObj){
                               $epicture = EVENT_STATIC_SERVER."/images/nophoto.gif";
                               if($eventObj->logo){
                                    $epicture = EVENT_IMG_URL_PATH."/".$eventObj->logo;
                               }
                               if($this->tid==21391 && $eventObj->banner!=""){
                                    $epicture = EVENT_IMG_URL_PATH."/".$eventObj->banner;  
                               }
                               if($this->tid==21391 && $eventObj->banner==""){
                                    $epicture = EVENT_STATIC_SERVER."/images/nophoto.gif";     
                               }


                               $href = "/event/detail/".$eventObj->eid;
                               if($this->action=='category' && $eventObj->short_cut != ""){
                                   $href = "/event/".$eventObj->short_cut;
                               }
                               else if($this->action=='category' && $eventObj->website != ""){
                                   $href = $eventObj->website;
                               }
                    ?>
                    <div class="item" id="div_event_<?php echo $eventObj->eid;?>">
                        <h1><i class="ico-tool ico-img ico-eventdt"></i><a href="<?php echo $href;?>"><?php echo check_plain($eventObj->event_name);?></a><span class="alert"><?php if($this->timeIndex=='all'){?> (<?php echo $this->eventStatus($eventObj);?>)<?php }?> 
                            <?php if($eventObj->start_time+24*60*60 >= time()){?>
                            <img src="<?php echo EVENT_STATIC_SERVER;?>/images/icons/icon_new.gif" alt="new"/>
                            <?php }?>
                            </span>
                        </h1>
                        <a href="<?=$href?>"><img src="<?=$epicture?>" width="120" height="90" alt="cat-user" /></a>
                        <p>
                            Cộng đồng: <a href="/event/search?nwid=<?php echo $eventObj->network_id;?>"><?php echo $eventObj->network_name;?></a> <br />
                            Chuyên mục: <a href="/event/cat/<?php echo $eventObj->tid;?>"><?php echo $eventObj->category_name;?></a> <br /> 
                            Thời gian: từ <strong><?=date("g:i", $eventObj->start_time)?>' <?=date("a", $eventObj->start_time)?> ngày <?=date("d/m/Y", $eventObj->start_time)?></strong>  tới <strong><?=date("g:i", $eventObj->end_time)?>' <?=date("a", $eventObj->end_time)?> ngày <?=date("d/m/Y", $eventObj->end_time)?></strong><br />
                            <?php if($eventObj->website != ""){?>
                            Website:  <a href="<?php echo $eventObj->website;?>" target="_blank"><?php echo $eventObj->website;?></a><br />
                            <?php }?>
                            Thành viên: <?php echo $eventObj->member_count;?> người 
                        </p>
                                <?php if($this->action=='my' && $this->is_owner){?>
                                <a href="javascript:void();" onClick="event_common.leaveEvent(<?php echo $eventObj->eid;?>, false);">Rời khỏi</a><br /> 
                                <?php }
                                else if($this->action=='invited' && $this->is_owner){?>
                                <a href="javascript:void();" onClick="event_common.joinEvent(<?php echo $eventObj->eid;?>, false);">Tham gia</a><br /> 
                                
                                <?php if(isset($this->status) && $this->status != "maybe"){?>
                                <a href="javascript:void();" onClick="event_common.maybeJoinEvent(<?php echo $eventObj->eid;?>, false);">Có thể tham gia</a><br /> 
                                <?php }?>
                                <a href="javascript:void();" onClick="event_common.notJoinEvent(<?php echo $eventObj->eid;?>, false);">Không tham gia</a><br />
                                   <?php }?>
                                <a href="/event/detail/<?php echo $eventObj->eid;?>">Xem tiếp</a>
                        <div class="clear"></div>
                        </div>
                    <?php 
                           }// end for loop
                       } // end of if
                    ?>
                    <?php echo $this->pager;?>
                    <div class="clear"></div>
                </div>
  <!--          </div>
        </div>   -->
<?}?>